﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%
 ControlPoint.ControlAPI.Device _device = (ControlPoint.ControlAPI.Device)ViewData["device"];
 %>
    <h2>Settings <%=ViewData["name"] %></h2>
    <ul>
    <% 
        Console.WriteLine("before device settings");
        foreach (ControlPoint.ControlAPI.Setting setting in _device.Settings.Settings.Values) {
            if (setting.Public) {%>
        <li><span class="setting_name"><%= setting.Name%>: </span><input class="setting_value" type="text" value="<%= setting.Value %>"/></li>
    <%      }
        } %>
    </ul>
</asp:Content>
